using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace dotIRC
{
    public partial class ChatForm : IrcChildForm
    {
        public string targetname;

        public ChatForm() {}

        public ChatForm(IrcSession session)
            : base(session)
        {
            InitializeComponent();
            Shown += new EventHandler(ChatForm_Shown);
            FormClosed += new FormClosedEventHandler(ChatForm_FormClosed);
        }

        void ChatForm_Shown(object sender, EventArgs e)
        {
            NodeText = targetname;
            Session.ChatWindows.Add(targetname, this);
        }

        void ChatForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            Session.ChatWindows.Remove(targetname);
        }
    }
}